export default function lintWordsWithOddWord(keyWord, item){
    let splits = []

    let key = item.key

    let start = 0
    let end = 0
    let oldEnd = 0
    if (key == undefined) return splits
    if (keyWord == ""){
        splits.push(key)
        return splits
    }

    //example: oak -> o
    while((start = key.toLowerCase().indexOf(keyWord.toLowerCase(), end)) > -1){
        end = start + keyWord.length

        
        splits.push(key.substring(oldEnd, start))
        splits.push(key.substring(start, end))
        
        oldEnd = end
    }
    splits.push(key.substring(end, key.length))
    return splits
}